<?php
$sql = "select * from tb_membership where id = '".$_GET['id']."'";
$qr = select($sql);
$rs = $qr[0];
?>
<script>
function loadpage(){
	$.get(
		'member_benefi_ajax.php',{id:<?=$_GET['id']?>},
		function(data){
			$('#content').html(data).hide().fadeIn('slow');;
			$('ul#icons li').hover(
				function() { $(this).addClass('ui-state-hover'); }, 
				function() { $(this).removeClass('ui-state-hover'); 
			});
			 fgbutton();
			
	});
}
$(function(){
	//loadpage();
});
function del(id)
{
	$('#msg').html('ต้องการลบข้อมูลนี้?');
	$("#dialog").dialog({
		modal: true,
		buttons: {
			ตกลง: function() {
					$.get(
						'member_control.php',
						{id:id,action:'delete_benefi'},
						function(data){
							loadpage();
					});
					$( this ).dialog( "close" );
				},
			ยกเลิก:function() {
					$( this ).dialog( "close" );
				}
		}
	});
}
</script>

<div id="tabs">
    <ul>
    	<li><a class="head_tab" style="padding-left:7px;" href="member_benefi_ajax.php?id=<?=$_GET['id']?>&level=1"><span class="ui-icon ui-icon-person" style="float:left;"></span>ขั้นที่ 1</a></li>
        <li><a class="head_tab" style="padding-left:7px;" href="member_benefi_ajax.php?id=<?=$_GET['id']?>&level=2"><span class="ui-icon ui-icon-person" style="float:left;"></span>ขั้นที่ 2</a></li>
        <li><a class="head_tab" style="padding-left:7px;" href="member_benefi_ajax.php?id=<?=$_GET['id']?>&level=3"><span class="ui-icon ui-icon-person" style="float:left;"></span>ขั้นที่ 3</a></li>
        <li><a class="head_tab" style="padding-left:7px;" href="member_benefi_ajax.php?id=<?=$_GET['id']?>&level=4"><span class="ui-icon ui-icon-person" style="float:left;"></span>ขั้นที่ 4</a></li>
    </ul>
</div>      
